This is part 3.2 of the Geodata Management Course 

Here is a **unified, comprehensive English summary** of the lecture *“Spatial Modelling & Simulation – Application Map”* based on both the **slide summary** and the **transcript of the recording**. All content that appears **exclusively in the lecture** is marked in ***bold and italics***.

---

## **Lecture Summary: Spatial Modelling & Simulation – Application Map**

### **1. Introduction to Spatial Modelling and Georeferencing**

Slide: Not in slide deck – lecture-only topic

The lecture begins by introducing spatial modelling and simulation in QGIS, focusing on creating precision fertilization maps using NDVI data and zonal statistics.

***Before delving into modelling, the lecturer provides an in-depth explanation of georeferencing, particularly for satellite or drone images that are not aligned with existing spatial data.***
Georeferencing involves two main steps:

1. Geometric transformation (shifting, rotating, scaling the image).
2. Resampling (recalculating pixel values).

***Georeferencing tools in QGIS are demonstrated using the built-in GDAL Georeferencer plug-in. Affine and first-order polynomial transformations are shown as most suitable for satellite imagery.***
***The lecture emphasizes using more than the minimum required ground control points (GCPs) to allow residual error analysis and increase accuracy.***

***Several resampling methods (Nearest Neighbor, Bilinear, Cubic Convolution) are discussed, noting trade-offs between visual appearance and preservation of pixel values.***

---

### **2. Zonal Statistics: Concept and Implementation**

Slides: 2–5

Zonal statistics extract information from a raster (e.g., NDVI, soil) based on zone geometries.

Slide 2: Requirements: matching raster resolutions, grid alignment, and projections.

Slides 3–5: Zones are defined as pixels with shared integer values. QGIS internally rasterizes vector zones.

*** Lecture adds an explanation of how interpolation can cause approximations when zones and rasters don't perfectly overlap. ***

Zonal statistics are used to derive statistical information from a value raster (e.g., NDVI or soil nitrate levels) for defined zones (grid cells).

**Key requirements:**

* Matching raster resolution and alignment
* Defined zones (vector or raster-based)

The **value raster** provides the continuous variable (e.g., NDVI or interpolated nitrate values), while the **zone raster or vector layer** (e.g., a 10x10 m grid) defines the spatial zones for aggregation.

***The lecture demonstrates how QGIS internally rasterizes the vector zones when using the "Zonal Statistics" tool.***

---

### **3. Creation of Fertilization Application Maps in QGIS**

Slide: 6

Two strategies are presented:

* **Without spatial data**: Uniform fertilization based on generalized recommendations (e.g., from AGES).
* **With spatial data**: Tailored application using NDVI, soil properties, and moisture data.

***Students generate a regular 10x10 m polygon grid covering the field area using the “Create Grid” tool in QGIS.***
***Attributes from interpolated nitrate values and NDVI images are assigned to this grid using zonal statistics.***

---

### **4. Deriving Nitrogen Application from NDVI**

Slides: 7–9 NDVI as a Proxy for Nutrient Demand
Slide: 10 Assigning NDVI to the 10x10m Grid
Slides: 11–14 Translating NDVI to Nitrogen Recommendations (Nxy)

Using NDVI as a proxy for biomass (and by extension, nutrient demand), a linear formula is applied to map NDVI values to nitrogen recommendations based on AGES guidelines:

$$
N_{xy} = \left(\frac{NDVI_{xy} - NDVI_{min}}{NDVI_{max} - NDVI_{min}}\right) \cdot (N_{max} - N_{min}) + N_{min}
$$

Example:

* NDVImin = 0.8111, NDVImax = 0.9278
* Nmin = 120 kg/ha, Nmax = 156 kg/ha

This yields a spatially variable nitrogen map across the field.

***The formula is entered into the QGIS Field Calculator using the grid’s `GrNDVImean` attribute.***

---

### **5. Adjusting for Soil Nitrogen Content**

Slide: 15

Soil nitrate (NO₃) content is subtracted from the initial nitrogen recommendation to avoid over-fertilization:

$$
Nxy_{red} = Nxy - NO3mean
$$

***The NO₃ values are previously derived from soil samples and spatially interpolated using Inverse Distance Weighting (IDW).***

---

### **6. Fertilizer Application Splitting**

Slide: 16

Fertilizer application is split into two phases:

* 40% in the first application
* 60% in the second

Conversion formula considering 27% nitrogen content:

$$
Nt1 = Nxy_{red} \cdot 0.4 \cdot \frac{100}{27}
$$

$$
Nt2 = Nxy_{red} \cdot 0.6 \cdot \frac{100}{27}
$$

***New attributes `Nt1` and `Nt2` are added to the grid for practical use in variable rate technology (VRT) equipment.***

---

### **7. Final Output and Map Storage**

Slides: 17–18

The processed grid is saved as a shapefile `schlag_netz10x10m.shp`, which includes:

* Mean NDVI (`GrNDVImean`)
* Calculated nitrogen need (`Nxy`)
* Adjusted nitrogen need (`Nxyred`)
* Application values for each time step (`Nt1`, `Nt2`)

---

### **8. Further Remarks from the Lecture**

Slide: Not shown in slides – concluding remarks in lecture

***The lecturer emphasizes that even pre-georeferenced satellite images (like Sentinel-2) may need fine adjustment to align with precise field boundaries.***

***Drone users typically achieve higher accuracy due to embedded GPS and software that builds orthophotos using terrain models.***

***Repeated georeferencing of raster data leads to cumulative smoothing and value distortion due to resampling.***
***Hence, it’s best to georeference raster data only once if possible.***

***For vector data, coordinate transformation is generally simpler and less prone to error.***

---

## **Conclusion**

This session illustrates a comprehensive spatial modelling workflow:

1. Collect and georeference satellite/drone imagery.
2. Interpolate and align spatial data with field zones.
3. Use NDVI to estimate biomass and nutrient demand.
4. Adjust recommendations using soil data.
5. Translate results into actionable application maps.

The integration of remote sensing, GIS tools, and agronomic knowledge enhances **resource efficiency** and supports **site-specific management practices** in precision agriculture.
